import './App.css';
import {useRef, useState} from "react";


function App() {

    let [isLogin, setIsLogin] = useState(true);

    return (
        <div>
            {isLogin && <h1>已登录</h1>}
            {isLogin ? <h1>已登录</h1> : <h1>请登录</h1>}
            <button onClick={()=>setIsLogin(!isLogin)}>click</button>
        </div>
    )
}

export default App;
